import CapitalIndex from './capitalIndex'
import CapitalList from './capitalList'

const capitalRouter = {

  path: 'finance/capitalIndex',
  getChildRoutes(nextState, cb) {
    require.ensure([], (require) => {
      cb(null, [
        {
          path: 'list',
          getComponents(nextState, cb) {
            require.ensure([], function (require) {
              cb(null, require('./capitalList'))
            })
          },
        }
      ])
    })
  },
  indexRoute: {
    getComponents(location, cb) {
      require.ensure([], function (require) {
        cb(null, CapitalList)
      })
      return cb()
    }
  },
  getComponents(nextState, cb) {
    require.ensure([], (require) => {
      cb(null, require('./capitalIndex'))
    })
  }
}
export default capitalRouter;

